package de.fmaul.dicheck.runner;

import java.util.ArrayList;
import java.util.List;

import de.fmaul.dicheck.model.DataSet;
import de.fmaul.dicheck.model.TestOutcome;

public class TestResult {

    private final DataSet dataSet = new DataSet();
    private final List<String> messages = new ArrayList<String>();
    private TestOutcome outcome = TestOutcome.NOTRUN;

    public boolean isPassed() {
        return outcome == TestOutcome.PASSED;
    }

    public DataSet getDataSet() {
        return dataSet;
    }

    public List<String> getMessages() {
        return messages;
    }

    public void addError(final String errorMessage) {
        getMessages().add(errorMessage);
    }

    public void setOutcome(final TestOutcome outcome) {
        this.outcome = outcome;

    }

    public TestOutcome getOutcome() {
        return outcome;
    }

}
